package com.chhuang.bean;

import com.chhuang.utils.string.RegexpUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.Valid;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @Description 描述
 * @Author Darren Huang
 * @Date 2022-12-23 14:57
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "ResetPasswordBean实体类", description = "重置密码参数实体类")
public class ResetPasswordBean {
    @NotBlank(message = "{password.not_blank}")
    @Pattern(regexp= RegexpUtils.PASSWORD_WITH_NUM_AND_LET_SYM,
            message = "{password.valid_fail}")
    @ApiModelProperty(value = "密码", required = true)
    private String password;

    @NotBlank(message = "{email.not_blank}")
    @Pattern(regexp = RegexpUtils.EMAIL_REGEXP, message = "{email.valid_fail}")
    @ApiModelProperty(value = "邮箱", required = true)
    private String email;

    @Valid
    @ApiModelProperty(value = "验证码对象", required = true)
    private CaptchaBean captchaBean;
}
